<?php
function dump($var)
{
    ob_start();
    var_dump($var);
    $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', ob_get_clean());
    echo $output;
}

function write_log($filename, $data)
{
    ob_start();
    var_dump($data);
    $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', ob_get_clean());
    $data = '[' . date('Y-m-d H:i:s') . ']' . $output . PHP_EOL;
    file_put_contents($filename, $data, FILE_APPEND);
}

function calibration_parameter()
{
    $args = func_get_args();
    if (!empty($args)) {
        foreach ($args as $key => $value) {
            if (!$value || empty($value)) return false;
        }
    }
    return true;
}